<div class="ibox float-e-margins">
    <h3><if condition='!empty($tag_id)'>编辑标签<else/>添加新标签</if></h3>
    <form method="post" class="form-horizontal p-sm"  action="<if condition='!empty($tag_id)'>{:U('Tag/modify')}<else/>{:U('Tag/insert')}</if>" id="form">
        <div class="form-group div-container">
            <label class="control-label ">名称</label>
            <div><input type="text" class="form-control" name="tag_name" id="tag_name" value="{$tag_name}" datatype="*" nullmsg="请输入标签名" ajaxurl="{:U('Ajax/isTagNameUsed',array('tag_id'=>$tag_id))}"/></div>
            <span>这将是它在站点上显示的名字</span>
            <div class="Validform_checktip text-danger"></div>
        </div>
        <div class="form-group div-container">
            <label class="control-label ">别名</label>
            <div><input type="text" class="form-control" name="alias" id="alias" value="{$alias}" datatype="/^(\w)+$/" nullmsg="请输入标签别名" errormsg="请输入标签别名" ajaxurl="{:U('Ajax/isTagAliasUsed',array('tag_id'=>$tag_id))}"/></div>
            <span>“别名”是在URL中使用的别称，它可以令URL更美观。通常使用小写，只能包含字母，数字和连字符（-）。</span>
            <div class="Validform_checktip text-danger"></div>
        </div>
        <div class="form-group">
            <div class="col-sm-2"><button class="btn btn-primary m-b"  type="submit"><if condition='!empty($tag_id)'>编辑标签<else/>添加新标签</if></button></div>
        </div>
        <input type="hidden" name="tag_id" value="{$tag_id}"/>
    </form>
</div>